<template>
  <div class="park-textarea park-textarea-plan">
    <el-input v-model="inputValue" v-bind="$attrs" :rows="14" type="textarea" />
  </div>
</template>

<script setup lang="ts">
import { ref, watch, defineProps, defineEmits } from 'vue'
const emits = defineEmits(['update:modelValue'])
const props = defineProps({
  modelValue: {
    type: String,
    default: ''
  },
  placeholder: {
    type: String,
    default: '请输入'
  }
})
const inputValue: any = ref(props.modelValue)

watch(() => inputValue.value, (newValue) => {
  emits('update:modelValue', newValue)
})

watch(() => props.modelValue, (newValue) => {
  inputValue.value = newValue
})

const handleInput = (event) => {
  // 可以在这里添加额外的逻辑，比如格式化输入值
  inputValue.value = event
  
}
</script>

<style lang="scss" scoped>
 
.park-textarea {
  display: inline-block;
  width: 100%; 
}
</style>